
#ifndef _VEHICLE_OTA__H__
#define _VEHICLE_OTA__H__

#include "stdint.h"
#include "OtaDataJson.h"
#include "VehicleOtaMain.h"
#include "OtaData.h"
#include "stdbool.h"
#include "Mqtt4GDriver.h"

void OtaMsgMarkDataInit(t_otaMsgMark *otaMsgMark);
void CheckVehicleOtaMsgCallBack(uint8_t* dataBuff,uint16_t dataLen);
int8_t OtaCheckUpgradeCondtion(void);
int8_t OtaMqttGetTopic(char *topicBuff,uint8_t topicBuffLen,tMqttMsgType type);
void OtaCmdMsgAckPkgInit(t_otaCmdAck *otaCmdMsgAckPkg);
int8_t OtaSubOlineMsgUp(uint8_t mqtt_id,uint8_t jsonTypeGEN_OtaId,uint8_t *msgType);
int8_t OtaServerMsgAck(uint8_t mqtt_id,uint8_t jsonTypeGEN_OtaId,bool state,uint32_t taskId,uint8_t *msgType,uint8_t *request,uint8_t *descrbtion);
int8_t OtaUpgradeMsgAck(uint8_t mqtt_id,uint8_t jsonTypeGEN_OtaId,bool state,uint8_t *msgType,uint8_t *request,uint8_t *descrbtion);
uint8_t OTA_Md5CodeCheck(uint8_t *Str1,uint8_t *Str2,uint8_t compareLen);
OTA_ECU_TYPE OtaConversionEcuType(uint8_t *ecuName,uint8_t strLen);
bool OtaIsMappingFile(OTA_ECU_TYPE ecuType,OtaFileType fileTyep);
void OtaUpgradeEndHandle(uint8_t otaState);















#endif
